<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<%@ page language="java" contentType="text/html; charset=utf-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>新生注册</title>
</head>
<body>
 <h1>您的基本信息是：</h1>
 <div>
 	<h1>${param.studentname}</h1>
 	<h1>${param.phone}</h1>
 	<h1>
 	<c:forEach items="${paramValues.from}" var="f">
 		<c:out value="${f}"></c:out>
 	</c:forEach>
 	</h1>
 </div>
 <%-- 
 <%
    request.setCharacterEncoding("utf-8");//汉字乱码
    String ip=request.getRemoteHost();//
    out.print("ip="+ip);
    String name=request.getParameter("studentname");
    //另一种写法
    //String name=request.getParameterValues("studentname")[0];
    out.print(",name="+name);
    String pass=request.getParameter("pass");
    out.print(",pass="+pass);
    String p=request.getParameter("phone");
    out.print(",phone="+p);
    String [] from=request.getParameterValues("from");
    for(int i=0;from!=null&&i<from.length;i++)
    	out.print("&nbsp;"+from[i]);
 %>
 
 <%
    if(name!=null&& name.length()>=6){
    	response.sendRedirect("student.jsp");
    	//request.getRequestDispatcher("student.jsp").forward(request, response);
    }else{
    	out.print("输入有误");
    }
 %>
 --%>
</body>
</html>